package com.yichuang.wuziqi.domain;

import java.io.Serializable;

/**
 * Created by xcm on 17-12-2.
 */

public class Data implements Serializable{

    //选手的行为
    public class PlayerAction {
        public static final int PLAYER_READY = 100;//准备完毕
        public static final int PLAYER_ADMIT_BEATEN = 101;//认输
        public static final int PLAYER_REQUEST_RETRACT = 102;//请求悔棋
        public static final int PLAYER_PERMIT_RETRACT = 103;//允许悔棋
        public static final int PLAYER_DROP = 104;//下子
    }


    //服务器的行为
    public class ServerAction {
        public static final int GAME_START = 200;//游戏开始
        public static final int GAME_OVER = 201;//游戏结束
    }

    public class GameConfig {
        //网络对战中游戏设定
        public static final int GAME_MAN = 301;//与人对战
        public static final int GAME_AI = 302;//与AI对战
    }


    int type;
    String data;

    public Data() {

    }

    public Data(int type, String data) {
        this.type = type;
        this.data = data;
    }

    public int getType() {
        return type;
    }

    public void setType(int type) {
        this.type = type;
    }

    public String getData() {
        return data;
    }

    public void setData(String data) {
        this.data = data;
    }

    @Override
    public String toString() {
        return "type=" + type + ",data=" + data;
    }
}
